<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<style type="text/css">
	.box{
		width: 800px;
		height: 300px;
		background: #C8BFE7;
	}
	</style>
</head>

<body>

	<div class="box" id="box">
		
	</div>

	<script type="text/javascript">
	var box1 =document.getElementById('box');

	str="秒之后返回";

	num = 10;

	function  djs() {
		box1.innerText=num+str;
		if(num==0){
			location.href="http://www.baidu.com";
		}
		num--;
	}

	var time1 = setInterval(djs,1000);


	</script>
	
</body>
</html>